<template>
  <!-- 操作日志管理 -->
  <div class="app-container">
    <el-tabs v-model="currentTab" @tab-click="handleClick">
      <el-tab-pane label="登录日志" name="1"></el-tab-pane>
      <el-tab-pane label="操作日志" name="2"></el-tab-pane>
    </el-tabs>
    <LoginLog v-if="currentTab == '1'"></LoginLog>
    <OperationLog v-if="currentTab == '2'"></OperationLog>
  </div>
</template>
    
<script>
import LoginLog from "./loginLog/index.vue"; //登录日志
import OperationLog from "./operationLog/index.vue"; //操作日志
export default {
  components: {
    LoginLog,
    OperationLog,
  },
  data() {
    return {
      currentTab: "1",
    };
  },
  methods: {
    handleClick(tab, event) {
      window.location.hash = `${this.currentTab}`;
    },
  },
  created() {
    if (window.location.hash) {
      this.currentTab = window.location.hash.slice(1);
    }
  },
};
</script>
  
<style lang="scss" scoped>
.searchHeight {
  height: calc(100% - 54px) !important;
}
</style>
